// CodeGear C++Builder
// Copyright (c) 1995, 2015 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ocv.comp.View.pas' rev: 30.00 (Windows)

#ifndef Ocv_Comp_ViewHPP
#define Ocv_Comp_ViewHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <Winapi.Windows.hpp>
#include <Winapi.Messages.hpp>
#include <System.SysUtils.hpp>
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.Graphics.hpp>
#include <System.SyncObjs.hpp>
#include <ocv.comp.Types.hpp>
#include <ocv.core.types_c.hpp>
#include <System.Types.hpp>

//-- user supplied -----------------------------------------------------------

namespace Ocv
{
namespace Comp
{
namespace View
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TocvViewFrames;
class DELPHICLASS TocvPersistentRect;
class DELPHICLASS TocvViewFrame;
class DELPHICLASS TocvView;
//-- type declarations -------------------------------------------------------
#pragma pack(push,4)
class PASCALIMPLEMENTATION TocvViewFrames : public System::Classes::TOwnedCollection
{
	typedef System::Classes::TOwnedCollection inherited;
	
public:
	/* TOwnedCollection.Create */ inline __fastcall TocvViewFrames(System::Classes::TPersistent* AOwner, System::Classes::TCollectionItemClass ItemClass) : System::Classes::TOwnedCollection(AOwner, ItemClass) { }
	
public:
	/* TCollection.Destroy */ inline __fastcall virtual ~TocvViewFrames(void) { }
	
};

#pragma pack(pop)

class PASCALIMPLEMENTATION TocvPersistentRect : public System::Classes::TPersistent
{
	typedef System::Classes::TPersistent inherited;
	
private:
	System::Types::TRect FRect;
	System::Classes::TNotifyEvent FOnChange;
	System::Types::TRect __fastcall GetRect(void);
	void __fastcall SetRect(const System::Types::TRect &Value);
	void __fastcall SetRectBottom(const int Value);
	void __fastcall SetRectLeft(const int Value);
	void __fastcall SetRectRight(const int Value);
	void __fastcall SetRectTop(const int Value);
	
protected:
	virtual void __fastcall AssignTo(System::Classes::TPersistent* Dest);
	
public:
	__property System::Types::TRect AsRect = {read=GetRect, write=SetRect};
	__fastcall virtual TocvPersistentRect(void);
	
__published:
	__property int Left = {read=FRect.Left, write=SetRectLeft, nodefault};
	__property int Top = {read=FRect.Top, write=SetRectTop, nodefault};
	__property int Right = {read=FRect.Right, write=SetRectRight, nodefault};
	__property int Bottom = {read=FRect.Bottom, write=SetRectBottom, nodefault};
	__property System::Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
public:
	/* TPersistent.Destroy */ inline __fastcall virtual ~TocvPersistentRect(void) { }
	
};


#pragma pack(push,4)
class PASCALIMPLEMENTATION TocvViewFrame : public System::Classes::TCollectionItem
{
	typedef System::Classes::TCollectionItem inherited;
	
private:
	Ocv::Comp::Types::_di_IocvDataSource FocvVideoSource;
	Ocv::Comp::Types::_di_IocvImage FImage;
	System::Syncobjs::TCriticalSection* FLock;
	TocvPersistentRect* FDrawRect;
	bool FEnabled;
	void __fastcall SetOpenCVVideoSource(const Ocv::Comp::Types::_di_IocvDataSource Value);
	Ocv::Comp::Types::_di_IocvImage __fastcall GetImage(void);
	bool __fastcall Lock(void);
	void __fastcall Unlock(void);
	
protected:
	HRESULT __stdcall QueryInterface(const GUID &IID, /* out */ void *Obj);
	int __stdcall _AddRef(void);
	int __stdcall _Release(void);
	void __fastcall TakeImage(const Ocv::Comp::Types::_di_IocvImage IplImage);
	void __fastcall SetVideoSource(System::TObject* const Value);
	
public:
	__fastcall virtual TocvViewFrame(System::Classes::TCollection* Collection);
	__fastcall virtual ~TocvViewFrame(void);
	__property Ocv::Comp::Types::_di_IocvImage Image = {read=GetImage};
	
__published:
	__property Ocv::Comp::Types::_di_IocvDataSource VideoSource = {read=FocvVideoSource, write=SetOpenCVVideoSource};
	__property TocvPersistentRect* DrawRect = {read=FDrawRect, write=FDrawRect};
	__property bool Enabled = {read=FEnabled, write=FEnabled, default=0};
private:
	void *__IocvDataReceiver;	// Ocv::Comp::Types::IocvDataReceiver 
	
public:
	#if defined(MANAGED_INTERFACE_OPERATORS)
	// {F67DEC9E-CCE0-49D2-AB9B-AD7E1020C5DC}
	operator Ocv::Comp::Types::_di_IocvDataReceiver()
	{
		Ocv::Comp::Types::_di_IocvDataReceiver intf;
		this->GetInterface(intf);
		return intf;
	}
	#else
	operator Ocv::Comp::Types::IocvDataReceiver*(void) { return (Ocv::Comp::Types::IocvDataReceiver*)&__IocvDataReceiver; }
	#endif
	
};

#pragma pack(pop)

class PASCALIMPLEMENTATION TocvView : public Vcl::Controls::TWinControl
{
	typedef Vcl::Controls::TWinControl inherited;
	
private:
	Ocv::Comp::Types::_di_IocvDataSource FocvVideoSource;
	Ocv::Comp::Types::_di_IocvImage FImage;
	Ocv::Comp::Types::TOnOcvAfterViewPaint FOnAfterPaint;
	Ocv::Comp::Types::TOnOcvNotify FOnBeforePaint;
	Vcl::Graphics::TCanvas* FCanvas;
	bool FStretch;
	bool FProportional;
	bool FCenter;
	TocvViewFrames* FFrames;
	HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Winapi::Messages::TWMEraseBkgnd &Message);
	HIDESBASE MESSAGE void __fastcall WMPaint(Winapi::Messages::TWMPaint &Message);
	void __fastcall SetOpenCVVideoSource(const Ocv::Comp::Types::_di_IocvDataSource Value);
	bool __fastcall isSourceEnabled(void);
	System::Types::TRect __fastcall PaintRect(void);
	
protected:
	void __fastcall SetVideoSource(System::TObject* const Value);
	void __fastcall TakeImage(const Ocv::Comp::Types::_di_IocvImage IplImage);
	
public:
	__fastcall virtual TocvView(System::Classes::TComponent* AOwner);
	__fastcall virtual ~TocvView(void);
	void __fastcall DrawImage(const Ocv::Comp::Types::_di_IocvImage IplImage);
	__property Vcl::Graphics::TCanvas* Canvas = {read=FCanvas};
	__property Ocv::Comp::Types::_di_IocvImage Image = {read=FImage};
	
__published:
	__property Ocv::Comp::Types::_di_IocvDataSource VideoSource = {read=FocvVideoSource, write=SetOpenCVVideoSource};
	__property bool Proportional = {read=FProportional, write=FProportional, default=0};
	__property bool Stretch = {read=FStretch, write=FStretch, default=1};
	__property bool Center = {read=FCenter, write=FCenter, default=0};
	__property TocvViewFrames* Frames = {read=FFrames, write=FFrames};
	__property Align = {default=0};
	__property Ocv::Comp::Types::TOnOcvAfterViewPaint OnAfterPaint = {read=FOnAfterPaint, write=FOnAfterPaint};
	__property Ocv::Comp::Types::TOnOcvNotify OnBeforePaint = {read=FOnBeforePaint, write=FOnBeforePaint};
	__property OnEnter;
	__property OnExit;
	__property OnKeyDown;
	__property OnKeyPress;
	__property OnKeyUp;
	__property OnMouseDown;
	__property OnMouseUp;
	__property OnMouseMove;
	__property OnMouseEnter;
	__property OnMouseLeave;
	__property OnMouseWheel;
	__property OnMouseWheelUp;
	__property OnMouseWheelDown;
public:
	/* TWinControl.CreateParented */ inline __fastcall TocvView(HWND ParentWindow) : Vcl::Controls::TWinControl(ParentWindow) { }
	
private:
	void *__IocvDataReceiver;	// Ocv::Comp::Types::IocvDataReceiver 
	
public:
	#if defined(MANAGED_INTERFACE_OPERATORS)
	// {F67DEC9E-CCE0-49D2-AB9B-AD7E1020C5DC}
	operator Ocv::Comp::Types::_di_IocvDataReceiver()
	{
		Ocv::Comp::Types::_di_IocvDataReceiver intf;
		this->GetInterface(intf);
		return intf;
	}
	#else
	operator Ocv::Comp::Types::IocvDataReceiver*(void) { return (Ocv::Comp::Types::IocvDataReceiver*)&__IocvDataReceiver; }
	#endif
	
};


//-- var, const, procedure ---------------------------------------------------
}	/* namespace View */
}	/* namespace Comp */
}	/* namespace Ocv */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_OCV_COMP_VIEW)
using namespace Ocv::Comp::View;
#endif
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_OCV_COMP)
using namespace Ocv::Comp;
#endif
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_OCV)
using namespace Ocv;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Ocv_Comp_ViewHPP
